<template>
  <div class="total">
    <bigTitle msg="集群状态"></bigTitle>
    <tip msg="在此您可以查看所有关于Kubectl节点的信息" />
    <div v-if="log" class="container">{{ log }}</div>
    <bigTitle msg="系统日志"></bigTitle>
    <tip msg="系统日志为K3s和openfaas运行时产生，仅供参考" />
    <div v-if="system_log" class="container">{{ system_log }}</div>
    <div class="height" style="height:20px;"></div>
  </div>
</template>

<script>
import bigTitle from "../component/title.vue";
import tip from "../component/tip.vue";
import { post } from "../../Middleware/mid_request";
export default {
  created() {
    post({
      url: "/get_cluster_status",
      success: (res) => {
        this.$data.log = res.data;
      },
    });
    post({
      url: "/get_system_log",
      success: (res) => {
        this.$data.system_log = res.data;
      },
    });
  },
  name: "kubenetesPage",
  props: {
    msg: String,
  },
  data() {
    return {
      log: "",
      system_log: "",
    };
  },
  components: {
    bigTitle,
    tip,
  },
  methods: {},
};
</script>

<style scoped>
.total {
  font-size: 30px;
  height: 100vh;
  width: 100%;
  overflow-y: scroll;
}
</style>